<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>『 知音培训信息管理平台』</title>


	<script type="text/javascript" src="__PUBLIC__/Resourse/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" charset="UTF-8" src="__PUBLIC__/Resourse/js/jquery.cookie.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Resourse/themes/default/easyui.css" id="easyuiTheme">
	<script type="text/javascript" charset="UTF-8" src="__PUBLIC__/Resourse/js/changeEasyuiTheme.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Resourse/themes/icon.css">
	<script type="text/javascript" src="__PUBLIC__/Resourse/js/jquery.easyui.min.js"></script>
	<style type="text/css">
		body {
			font: 12px/20px "微软雅黑", "宋体", Arial, sans-serif, Verdana, Tahoma;
			padding: 0;
			margin: 0;
		}
		.layout-split-proxy-h{
			position:absolute;
			width:2px;
			background:#888;
			font-size:1px;
			cursor:e-resize;
			display:none;
			z-index:5;
		}
		
		.layout-split-north{
			border-bottom:5px solid #efefef;
		}
		.layout-split-south{
			border-top:5px solid #efefef;
		}
		.layout-split-east{
			border-left:0px solid #efefef;
		}
		.layout-split-west{
			border-right:0px solid #efefef;
		}
		.layout-button-up{
			background: url('__PUBLIC__/Resourse/themes/gray/images/layout_arrows.png') no-repeat -16px 0;
		}
		.layout-button-down{
			background: url('__PUBLIC__/Resourse/themes/gray/images/layout_arrows.png') no-repeat -16px -16px;
		}
		.layout-button-left{
			background: url('__PUBLIC__/Resourse/themes/gray/images/layout_arrows.png') no-repeat 0 0;
		}
		.layout-button-right{
			background: url('__PUBLIC__/Resourse/themes/gray/images/layout_arrows.png') no-repeat 0 -16px;
		}
		a:link {
		 text-decoration: none;
		}
		a:visited {
		 text-decoration: none;
		}
		a:hover {
		 text-decoration: underline;
		}
		a:active {
		 text-decoration: none;
		}
		.cs-north {
			height:60px;
		}
		.cs-north-bg {
			width: 100%;
			height: 100%;
			background: url(__PUBLIC__/Resourse/themes/gray/images/header_bg.png) repeat-x;
		}
		.cs-north-logo {
			height: 40px;
			margin: 15px 0px 0px 5px;
			display: inline-block;
			color:#000000;font-size:22px;font-weight:bold;text-decoration:none
		}
		.cs-west {
			width:200px;padding:0px;
		}
		.cs-navi-tab {
			padding: 5px;
		}
		.cs-tab-menu {
			width:120px;
		}
		.cs-home-remark {
			padding: 10px;
		}
		.wrapper {
		    float: right;
		    height: 30px;
		    margin-left: 10px;
		}
		.ui-skin-nav {
		    float: right;
			padding: 0;
			margin-right: 10px;
			list-style: none outside none;
			height: 30px;
		}
		
		.ui-skin-nav .li-skinitem {
		    float: left;
		    font-size: 12px;
		    line-height: 30px;
			margin-left: 10px;
		    text-align: center;
		}
		.ui-skin-nav .li-skinitem span {
			cursor: pointer;
			width:10px;
			height:10px;
			display:inline-block;
		}
		.ui-skin-nav .li-skinitem span.cs-skin-on{
			border: 1px solid #FFFFFF;
		}
		
		.ui-skin-nav .li-skinitem span.gray{background-color:gray;}
		.ui-skin-nav .li-skinitem span.default{background-color:blue;}
		.ui-skin-nav .li-skinitem span.bootstrap{background-color:#D7EBF9;}
		.ui-skin-nav .li-skinitem span.black{background-color:black;}
		.ui-skin-nav .li-skinitem span.metro{background-color:#FFE57E;}
	</style>
	
	<style type="text/css">
		body {
			margin:0px;
			padding:0px;
			width:100%;
			height:100%;
		}
	</style>
	<script type="text/javascript">
		
		function addTab(title, url){
			if ($('#tabs').tabs('exists', title)){
				$('#tabs').tabs('select', title);//选中并刷新
				var currTab = $('#tabs').tabs('getSelected');
				var url = $(currTab.panel('options').content).attr('src');
				if(url != undefined && currTab.panel('options').title != 'Home') {
					$('#tabs').tabs('update',{
						tab:currTab,
						options:{
							content:createFrame(url)
						}
					})
				}
			} else {
				var content = createFrame(url);
				$('#tabs').tabs('add',{
					title:title,
					content:content,
					closable:true
				});
			}
			tabClose();
		}
		function createFrame(url) {
			var s = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:99%;border:0;"></iframe>';
			return s;
		}
				
		function tabClose() {
			/*双击关闭TAB选项卡*/
			$(".tabs-inner").dblclick(function(){
				var subtitle = $(this).children(".tabs-closable").text();
				$('#tabs').tabs('close',subtitle);
			})
			/*为选项卡绑定右键*/
			$(".tabs-inner").bind('contextmenu',function(e){
				$('#mm').menu('show', {
					left: e.pageX,
					top: e.pageY
				});
		
				var subtitle =$(this).children(".tabs-closable").text();
		
				$('#mm').data("currtab",subtitle);
				$('#tabs').tabs('select',subtitle);
				return false;
			});
		}		
		//绑定右键菜单事件
		function tabCloseEven() {
			//刷新
			$('#mm-tabupdate').click(function(){
				var currTab = $('#tabs').tabs('getSelected');
				var url = $(currTab.panel('options').content).attr('src');
				if(url != undefined && currTab.panel('options').title != 'Home') {
					$('#tabs').tabs('update',{
						tab:currTab,
						options:{
							content:createFrame(url)
						}
					})
				}
			})
			//关闭当前
			$('#mm-tabclose').click(function(){
				var currtab_title = $('#mm').data("currtab");
				$('#tabs').tabs('close',currtab_title);
			})
			//全部关闭
			$('#mm-tabcloseall').click(function(){
				$('.tabs-inner span').each(function(i,n){
					var t = $(n).text();
					if(t != 'Home') {
						$('#tabs').tabs('close',t);
					}
				});
			});
			//关闭除当前之外的TAB
			$('#mm-tabcloseother').click(function(){
				var prevall = $('.tabs-selected').prevAll();
				var nextall = $('.tabs-selected').nextAll();		
				if(prevall.length>0){
					prevall.each(function(i,n){
						var t=$('a:eq(0) span',$(n)).text();
						if(t != 'Home') {
							$('#tabs').tabs('close',t);
						}
					});
				}
				if(nextall.length>0) {
					nextall.each(function(i,n){
						var t=$('a:eq(0) span',$(n)).text();
						if(t != 'Home') {
							$('#tabs').tabs('close',t);
						}
					});
				}
				return false;
			});
			//关闭当前右侧的TAB
			$('#mm-tabcloseright').click(function(){
				var nextall = $('.tabs-selected').nextAll();
				if(nextall.length==0){
					//msgShow('系统提示','后边没有啦~~','error');
					alert('后边没有啦~~');
					return false;
				}
				nextall.each(function(i,n){
					var t=$('a:eq(0) span',$(n)).text();
					$('#tabs').tabs('close',t);
				});
				return false;
			});
			//关闭当前左侧的TAB
			$('#mm-tabcloseleft').click(function(){
				var prevall = $('.tabs-selected').prevAll();
				if(prevall.length==0){
					alert('到头了，前边没有啦~~');
					return false;
				}
				prevall.each(function(i,n){
					var t=$('a:eq(0) span',$(n)).text();
					$('#tabs').tabs('close',t);
				});
				return false;
			});
		
			//退出
			$("#mm-exit").click(function(){
				$('#mm').menu('hide');
			})
		}
		
		$(function() {
			tabCloseEven();
		
			$('.cs-navi-tab').click(function() {
				var $this = $(this);
				var href = $this.attr('src');
				var title = $this.text();
				addTab(title, href);
			});
		
			var skins = $('.li-skinitem span').click(function() {
				//debugger;
				var $this = $(this);
				if($this.hasClass('cs-skin-on')) return;
				skins.removeClass('cs-skin-on');
				$this.addClass('cs-skin-on');
				var skin = $this.attr('rel');
				if(skin === undefined) return;
				changeThemeFun(skin);
				//$('#swicth-style').attr('href', themes[skin]);
				//setCookie('cs-skin', skin);
				//skin == 'dark-hive' ? $('.cs-north-logo').css('color', '#FFFFFF') : $('.cs-north-logo').css('color', '#000000');
			});
			
			function expandAll(){
				var node = $('#tt').tree('getSelected');
				if (node){
					$('#tt').tree('expandAll', node.target);
				} else {
					$('#tt').tree('expandAll');
				}
			}

		});

		$(document).ready(function(){

			
			$('#tt').tree({  
			    url:'__URL__/menu/'  
			}); 
		
			$('#tt').tree({
				onClick: function(node){
					//alert(node.attributes);  // alert node text property when clicked
					if(node.attributes === undefined) return;
					var href = '__APP__/'+ node.attributes + '/index/';
					addTab(node.text, href);
				}
			});
			
			//alert("current skins:" +$.cookie('easyuiThemeName'));
			//var skin = $.cookie('easyuiThemeName');
			//changeThemeFun(skin);
			//if (typeof skin == undefined) 
			var skin = $.cookie('easyuiThemeName');
			if (skin != null && typeof skin != undefined) {
				//alert(skin);
				debugger;
				
				changeThemeFun(skin);
			}
			//expandAll();
			
		});

	
	</script>

</head>

<body class="easyui-layout" style="border-width:50px;margin:0;">
	<div data-options="region:'north'" style="height:79px;overflow: hidden;" class="cs-north">
		<div class="cs-north-bg">
			<div class="nav">
				欢迎你！<?php echo (session('loginUserName')); ?>
				<a href="__URL__/password/"><img src="__PUBLIC__/images/checked_out.png" width="16" height="16" border="0" alt="" align="absmiddle"> 修改密码</a> 
				<a href="__URL__/profile/"><img SRC="__PUBLIC__/images/write.gif" WIDTH="17" HEIGHT="16" BORDER="0" ALT="" align="absmiddle"> 修改资料</a> 
				<a href="__URL__/logout/" target="_top"><img SRC="__PUBLIC__/images/error.gif" WIDTH="20" HEIGHT="20" BORDER="0" ALT="" align="absmiddle"> 退 出</a>
			</div>
			<div class="cs-north-logo">知音培训信息平台</div>
				<ul class="ui-skin-nav">				
					<li class="li-skinitem" title="gray"><span class="gray" rel="gray"></span></li>
					<li class="li-skinitem" title="default"><span class="default" rel="default"></span></li>
					<li class="li-skinitem" title="bootstrap"><span class="bootstrap" rel="bootstrap"></span></li>
					<li class="li-skinitem" title="black"><span class="black" rel="black"></span></li>
					<li class="li-skinitem" title="metro"><span class="metro" rel="metro"></span></li>
				</ul>
		</div>
	</div>
	<div region="west" split="true" title="功能列表" style="width:200px;padding:10px;" class="cs-west">
			<ul id="tt"></ul>  
	</div>
	<div id="mainPanle"  region="center" border="true" title="center" >
		 <div id="tabs" class="easyui-tabs"  fit="true" border="false"  style="overflow: hidden; width: 100%; height: auto;">
                <div title="Home">
					<div class="cs-home-remark">
						<h1>jQuery EasyUI 1.3.2 API</h1> <br>
						制作：purediy <br>
						博客：<a href="http://www.cnblogs.com/purediy" target="_blank">http://www.cnblogs.com/purediy</a><br>
						说明：jQuery EasyUI 1.3.2 API离线文档，与官网API文档完全一致。
					</div>
				</div>
        </div>
	</div>

	<div region="south"  style="height: 28px;overflow: hidden;" 
			class="panel-body panel-body-noheader layout-body">
		<div class="panel-header panel-header-noborder" style="text-align: center;">
				Copyright @ 2013 ZHIYIN
		</div>
	</div>
	<div id="mm" class="easyui-menu cs-tab-menu">
		<div id="mm-tabupdate">刷新</div>
		<div class="menu-sep"></div>
		<div id="mm-tabclose">关闭</div>
		<div id="mm-tabcloseother">关闭其他</div>
		<div id="mm-tabcloseall">关闭全部</div>
	</div>
</body>
</html>